home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 15 (1990)(MegaDisc Digital Publishing)(AU)[WB][reissue].zip / MegaDisc 15 (1990)(MegaDisc Digital Publishing)(AU)[WB][reissue].adf / Programs / NOTEBOOK < prev    next >
Text File  |  1989-12-27  |  2KB  |  51 lines

  1.  
  2. .key PRINT/S,SHOW/S,DELETE/S,SAVE/K ;//sets up template for the arguments
  3.                                     ;//PRINT, SHOW and DELETE are switches
  4.                                     ;//SAVE is a keyword which requires
  5.                                     ;  an argument if entered
  6.  
  7. if <PRINT> eq "PRINT"                     ;//checks whether PRINT entered
  8. type >prt: Ram:Notes                      ;   if so, prints
  9. endif
  10.  
  11. if <SHOW> eq "SHOW"                       ;//checks whether SHOW entered
  12. type Ram:Notes                            ;  if so, displays on screen
  13. endif
  14.  
  15. if <SAVE> not eq ""             ;//checks whether SAVE and a name entered
  16. copy ram:Notes <SAVE>           ;   if so saves to filename entered after
  17. endif                           ;   the word SAVE
  18.  
  19. if <DELETE> EQ "DELETE"              ;//checks whether DELETE entered
  20. delete ram:Notes                     ;if so deletes file
  21. skip NoNote                          ;//if DELETE, skip the entry routine
  22. endif
  23.  
  24. if <SAVE> not eq ""                ;//if SAVE and a filename                    skip NoNote                                     ;  entered, skip the entry routine
  25. else
  26.  
  27. if <PRINT> eq "PRINT"              ;//or if PRINT, skip the entry routine
  28. Skip NoNote
  29. else
  30.  
  31. if <SHOW> eq "SHOW"              ;//or if SHOW, skip the entry routine
  32. skip NoNote
  33. endif
  34. endif                            ;//only gets to here if not PRINT,SHOW
  35.                                  ;  SAVE or DELETE so we want to add note
  36.  
  37. echo "            Use Ctrl+\ to finish"            ;// say how to get out
  38. echo "*E[32m"                  ;//pen colour to black, outputs blank line
  39. if not exists ram:Notes        ;//check whether file already exists
  40. date  >ram:Notes               ;  if not, create file with date & time
  41. else
  42. date >>ram:Notes               ;  if so adds current date and time
  43. endif
  44. type >>ram:Notes *             ;//accepts keyboard input and directs it
  45.                                ;   to end of file until Ctrl-/ is entered
  46. echo >>ram:Notes " "           ;//adds blank line to file
  47. echo "*E[31m"                  ;//restores pen colour to white
  48. lab NoNote                     ;where to skip to if DELETE,PRINT or SAVE
  49.  
  50.  
  51.